<template>
  <div class="vip-header-container">
    <p class="vip-title">会员专区</p>
    <div class="content">
      <div v-if="!userStore.userinfo.avatar" class="avatar notshowname"></div>
      <el-avatar
        v-else
        icon="el-icon-user-solid"
        size="large"
        shape="circle"
        :src="userStore.userinfo.avatar"
        fit="fill"
      ></el-avatar>
      <div class="vip-mid">
        <div class="vip-user">
          <div class="name">
            {{ userStore.userinfo.name }}
            <span class="level_box medium" style="margin-left: 8px">
              <a
                href="https://www.dance365.com/home?userId=ff80808183536c3d01835536b2ac5a27"
              >
                <i class="lv"></i>
                <i class="lv1"></i>
              </a>
            </span>
          </div>
          <div class="vip-tip">开通会员尊享10大特权</div>
        </div>
        <router-link to="/home/center/my_member">
          <div class="right-item">
            <span></span>
            <p>以下<i>713</i>个会员专区课程<br />全部免费学习</p>
          </div>
        </router-link>
        <div class="right-item">
          <router-link to="/home/center/my_member"><span class="icon"></span></router-link>
          <p>购买非会员专区课程<br />可获会员立减优惠</p>
        </div>
        <div style="width: 80px;">
          
          <el-button
            style="margin-bottom: 8px;text-decoration: none;"
            color="#f93684"
            round
            class="el_button"
            ><router-link to="/home/center/my_member">立即开通</router-link></el-button
          >
     
          <span class="more-right"><router-link to="/home/center/my_member">查看/开通 ></router-link></span>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useUserInfoStore } from "@/stores/userInfo";
const userStore = useUserInfoStore();
</script>

<style scoped>
.vip-header-container {
  width: 1140px;
  margin: 15px auto 10px auto;
  color: #111;
  background-color: #fff;
  margin-top: 15px;
  /* margin-bottom: 10px; */
  border-radius: 4px;
  padding: 20px 30px 16px;
}
.vip-title {
  font-size: 16px;
  margin: 0 0 16px;
  font-weight: 400;
}
.vip-header-container .content {
  position: relative;
  min-height: 50px;
  display: flex;
  align-items: center;
}
.notshowname {
  background: url(https://rs.dance365.com/default_head@3x.png?imageView2/0/w/100/h/100/format/webp/ignore-error/1)
    no-repeat center;
  background-size: 100% 100%;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  margin-right: 10px;
}
.vip-header-container .content .vip-mid {
  flex: 1;
  display: flex;
  align-items: center;
}
.vip-user {
  position: relative;
  min-width: 220px;
  border-right: 1px solid #dee2e6;
}
.name {
  padding-top: 4px;
  font-size: 16px;
}
.vip-tip {
  margin-top: 8px;
  font-size: 12px;
  color: #f93684;
}
.level_box {
  box-sizing: border-box;
  background: linear-gradient(#ff289b, #ff43d0);
  border: 1px solid #fff;
  border-radius: 4px;
  padding: 0 8px;
  display: inline-block !important;
  line-height: 1.15;
  white-space: nowrap;
  cursor: pointer;
  width: 40px;
  height: 20px;
}
.lv {
  width: 15px;
  height: 10px;
  background-image: url(https://rs.dance365.com/level_Lv.@3x.png);
}
i {
  width: 8px;
  height: 10px;
  display: inline-block;
  background-size: 100%;
  background-repeat: no-repeat;
}
.lv1 {
  width: 8px;
  height: 10px;
  background-image: url(https://rs.dance365.com/level_num_1@3x.png);
}
.right-item {
  flex: 1;
  text-align: center;
  cursor: pointer;
}
.right-item span {
  width: 58px;
  height: 58px;
  display: inline-block;
  background-size: 100%;
  vertical-align: middle;
  margin-right: 30px;
  background-image: url(https://rs.dance365.com/teach_video_free.png);
  text-align: center;
}
.right-item p {
  display: inline-block;
  vertical-align: middle;
}
.right-item p i {
  font-style: normal;
  color: #f93684;
  display: inline;
}
.right-item .icon {
  background-image: url(https://rs.dance365.com/member_preferential.png);
}
.more-right {
  color: #7d8090;
  font-size: 12px;
}
.el_button {
  width: 70px;
}
a:-webkit-any-link{
  text-decoration: none;
}
</style>
